----------------------------------Spell Variables--------------------------------------
SPELL.m_iSpellID = 41316 -- Whatever value you want as long as it doesn't override any other spells' IDs.
SPELL.m_iRange = 1024
SPELL.m_sName = "Shadow Step"
SPELL.m_sToolTip = "Step through the shadows and behind your target, stunning it for 2 seconds."
SPELL.m_sIcon = "devin/blackbetty/spells/rogue/shadowstep.png"
SPELL.m_iCoolDown = 10
SPELL.m_iManaCost = 15
SPELL.m_bRequiresTarget = true
SPELL.m_iSpellType = SPELLTYPE_MOBILITY
SPELL.m_bRecastWhileCasting = false

---------------------------------------------------------------------------------------

local range = 100
local weapondamage = 20

function SPELL:Cast( pl, target )
	print("Casted "..self.m_sName.."!")
	pl:EmitSound("devin/blackbetty/weapons/rogue/shadowstep.wav", 100, 100)
	if(target:IsPlayer())then
		local b = AddEffect(target, 3, 2)
	end
	pl:SetPos(target:GetPos())
	pl:SetAngles(target:GetAngles())
	ParticleEffect( "shadowstep", pl:GetPos(), Angle(0,0,0), pl )
	ParticleEffect( "shadowstep", target:GetPos(), Angle(0,0,0), target )
	timer.Simple(0.05, function()
	pl:SetNWBool("Casting", false) 
	pl:SetNWBool("Casted", false)
	end)
end



